package com.ruoyi.export.utils;


import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author klguang
 *
 */
public class JxlsDateUtils {



	// 日期格式化
	public String dateFmt(Date date, String fmt) {
		if (date == null) {
			return "";
		}
		try {
			SimpleDateFormat dateFmt = new SimpleDateFormat(fmt);
			return dateFmt.format(date);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "";
	}

	// if判断
	public Object ifelse(boolean b, Object o1, Object o2) {
		return b ? o1 : o2;
	}

}
